<template>
  <div class="panel">
    <h2>{{  title }}  
      <a href="#" @click="tiao(0)">{{ go }}</a>
      <a href="#" @click="tiao(1)">{{ goo }}</a>
    </h2>
    <div class="chart">
      <slot /><!--插槽-->
    </div>
    <div class="panel-footer"></div>
  </div>
</template>

<script setup>
defineProps({
  title:{
    type:String
  },
  go:{
    type:String
  },
  goo:{
    type:String
  }
});
</script>

<style scoped lang="less">
.panel{
  position: relative;
  height:310px;
  border: 1px solid rgba(25, 186, 139, 0.17);
  background: url(../assets/line.png) rgba(255,255,255,0.04);
  padding:15px;
  margin-bottom:15px;
  &::before {
    position: absolute;
    top: 0;
    left: 0;
    content: "";
    width: 10px;
    height: 10px;
    border-top: 2px solid #02a6b5;
    border-left: 2px solid #02a6b5;
  }
  &::after {
    position: absolute;
    top: 0;
    right: 0;
    content: "";
    width: 10px;
    height: 10px;
    border-top: 2px solid #02a6b5;
    border-right: 2px solid #02a6b5;
  }
  .active{
    display: none;
  }
  .panel-footer {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    &::before {
      position: absolute;
      bottom: 0;
      left: 0;
      content: "";
      width: 10px;
      height: 10px;
      border-bottom: 2px solid #02a6b5;
      border-left: 2px solid #02a6b5;
    }
    &::after {
      position: absolute;
      bottom: 0;
      right: 0;
      content: "";
      width: 10px;
      height: 10px;
      border-bottom: 2px solid #02a6b5;
      border-right: 2px solid #02a6b5;
    }
  }
  h2{
    height: 48px;
    line-height: 48px;
    text-align: center;
    color: #fff;
    font-size: 20px;
    font-weight: 400;
    margin-top:-10px;
    a{
      color:#fff;
      text-decoration: none;
      margin:0 10px;
    }
  }
  .chart{
    height: 240px;
    //background-color: pink;
  }
}
</style>